window.YMap = function(option){
	option = option||{};
	if(option.mapDiv){
		var pyrmont = new google.maps.LatLng(39.932907,116.400146);
		this.map = new google.maps.Map(document.getElementById(option.mapDiv), {
          mapTypeId: google.maps.MapTypeId.ROADMAP,
          center: pyrmont,
          zoom: 15
        });
       
		if (option.addPointDiv) {
			this.pointOperator = new PointOperator( {
				map : this.map,
				div : option.addPointDiv,
				typesDiv : option.typesDiv,
				searchResult : option.searchResult
			});
		}
		if(option.searchDiv){
//			this.search = new GSearch(this.map,option.searchDiv);
			this.search = new Search(this,option.searchDiv);
		}
		if (!option.noContextMenu) {
			var menu = new MapContextMenu(this.map);
			this.mapContextMenu = menu;
		}
		if (!option.noRoute) {
			this.route = new GoogleDirections(this,option.searchResult);
		}
	}
}

window.YMap.prototype = {
	
}